require('../../less/controls/icon.less');
var React = require('react');

module.exports = React.createClass({
	displayName:'Icon',
	getInitialState:function(){
		return {
			spin: this.props.spin || false
		}
	},
	componentDidMount:function(){

	},
	spin: function () {
		this.setState({
			spin: true
		});
	},
	unspin: function () {
		this.setState({
			spin: false
		});
	},
	render:function(){
		return (
			<i className={"c-icon fa " + (this.props.icon||'default') + ' ' + (this.state.spin?'icon-spin':'')} {...this.props}></i>
		);
	}
});
